package com.tjetc.字符转换流;

import java.io.*;

public class T01OutputStreamWriter {
    public static void main(String[] args) throws IOException {
        //包装 从内向外包
        FileOutputStream  fileOutPutStream = new FileOutputStream("b.txt");
        //包第二层 转换流
        OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutPutStream,"UTF-8");
        //包第三层 缓冲流
        BufferedWriter bufferedWriter = new BufferedWriter(outputStreamWriter);
        bufferedWriter.write("你好");
        bufferedWriter.newLine();
        bufferedWriter.write("世界");
        bufferedWriter.close();


    }

}
